package cn.virens.oauth.request.principal;

import cn.virens.common.exception.APIException;

import javax.security.auth.Subject;
import java.time.LocalDateTime;

@SuppressWarnings("serial")
public abstract class DelegatePrincipalReadonly extends DelegatePrincipal {

    @Override
    public void setExpireTime(LocalDateTime expireTime) throws APIException {
        throw new APIException("Not allow modify");
    }

    @Override
    public void setRetryTime(LocalDateTime retryTime) throws APIException {
        throw new APIException("Not allow modify");
    }

    @Override
    public void setLoginTime(LocalDateTime loginTime) throws APIException {
        throw new APIException("Not allow modify");
    }

    @Override
    public void setLoginAuth(String loginAuth) throws APIException {
        throw new APIException("Not allow modify");
    }

    @Override
    public void setTenantSuper(Boolean tenantSuper) throws APIException {
        throw new APIException("Not allow modify");
    }

    @Override
    public void setTenantName(String tenantName) throws APIException {
        throw new APIException("Not allow modify");
    }

    @Override
    public void setDepartName(String departName) throws APIException {
        throw new APIException("Not allow modify");
    }

    @Override
    public void setTenantId(String tenantId) throws APIException {
        throw new APIException("Not allow modify");
    }

    @Override
    public void setDepartId(String departId) throws APIException {
        throw new APIException("Not allow modify");
    }

    @Override
    public void setAreaName(String areaName) throws APIException {
        throw new APIException("Not allow modify");
    }

    @Override
    public void setAreaId(String areaId) throws APIException {
        throw new APIException("Not allow modify");
    }

    @Override
    public void setRoleName(String roleName) throws APIException {
        throw new APIException("Not allow modify");
    }

    @Override
    public void setRoleId(String roleId) throws APIException {
        throw new APIException("Not allow modify");
    }

    @Override
    public void setAvatar(String avatar) throws APIException {
        throw new APIException("Not allow modify");
    }

    @Override
    public void setUname(String uname) throws APIException {
        throw new APIException("Not allow modify");
    }

    @Override
    public void setUuid(String uuid) throws APIException {
        throw new APIException("Not allow modify");
    }

    @Override
    public LocalDateTime getExpireTime() throws APIException {
        return delegate().getExpireTime();
    }

    @Override
    public LocalDateTime getRetryTime() throws APIException {
        return delegate().getRetryTime();
    }

    @Override
    public LocalDateTime getLoginTime() throws APIException {
        return delegate().getLoginTime();
    }

    @Override
    public String getLoginAuth() throws APIException {
        return delegate().getLoginAuth();
    }

    @Override
    public Boolean getTenantSuper() throws APIException {
        return delegate().getTenantSuper();
    }

    @Override
    public String getTenantName() throws APIException {
        return delegate().getTenantName();
    }

    @Override
    public String getTenantId() throws APIException {
        return delegate().getTenantId();
    }

    @Override
    public String getDepartName() throws APIException {
        return delegate().getDepartName();
    }

    @Override
    public String getDepartId() throws APIException {
        return delegate().getDepartId();
    }

    @Override
    public String getAreaName() throws APIException {
        return delegate().getAreaName();
    }

    @Override
    public String getAreaId() throws APIException {
        return delegate().getAreaId();
    }

    @Override
    public String getRoleName() throws APIException {
        return delegate().getRoleName();
    }

    @Override
    public String getRoleId() throws APIException {
        return delegate().getRoleId();
    }

    @Override
    public String getAvatar() throws APIException {
        return delegate().getAvatar();
    }

    @Override
    public String getUname() throws APIException {
        return delegate().getUname();
    }

    @Override
    public String getUuid() throws APIException {
        return delegate().getUuid();
    }

    @Override
    public String getName() throws APIException {
        return delegate().getName();
    }

    @Override
    public boolean implies(Subject subject) throws APIException {
        return delegate().implies(subject);
    }

    @Override
    public boolean equals(Object obj) throws APIException {
        return delegate().equals(obj);
    }

    @Override
    public String toString() throws APIException {
        return delegate().toString();
    }

    @Override
    public int hashCode() throws APIException {
        return delegate().hashCode();
    }

    public abstract DelegatePrincipal delegate();
}
